Skip to main content
POST
/
train
/
text
/
Train Text
curl --request POST \
  --url https://rag-prod.studio.lyzr.ai/v3/train/text/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "data": [
    {
      "text": "string",
      "source": "string",
      "extra_info": {}
    }
  ],
  "chunk_size": 1000,
  "chunk_overlap": 100
}'
"<string>"

Authorizations

x-api-key
string
header
required

Query Parameters

rag_id
string
required

The ID of the RAG system to train (must be a 24-character hex string).

Example:

"654c602a46c3b6d4e28741b0"

Body

application/json
data
object[]
required

Array of text objects to be trained.

chunk_size
integer
required

Size of the chunks for text splitting.

Example:

1000

chunk_overlap
integer
required

Overlap between consecutive text chunks.

Example:

100

Response

Text successfully processed and RAG system trained.

Placeholder for a success message or job ID.